import './assets/main.css'
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router/index'
import store from './store'
import Cookies from 'js-cookie'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import BaiduMapOffline from 'vue-baidu-map-offline';
import BaiduMap from 'vue-baidu-map-3x'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(BaiduMapOffline, {
    offline: true
});

app.use(BaiduMap, {
    ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
    v: '3.0',
    // type: 'WebGL'
});

app.use(store)
app.use(ElementPlus, {
    size: Cookies.get('size') || 'medium', // set element-ui default size
})
app.use(router)
app.mount('#app')
